package com.hxcy.detail;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.Log;
import android.view.ViewGroup;

import java.util.List;

public class BaseFragmentAdapter extends FragmentPagerAdapter {

    private String TAG = BaseFragmentAdapter.class.getSimpleName();

    private List<Fragment> mFragments;
    private String[] mTitles ;

    public BaseFragmentAdapter(FragmentManager fm, List<Fragment> mFragments, String[] mTitles) {
        super(fm);
        this.mFragments = mFragments;
        this.mTitles = mTitles;
    }

    @Override
    public Fragment getItem(int i) {
        ListFragment fragment=new ListFragment();
        return fragment;
    }

    @Override
    public int getCount() {
        return mTitles.length;
    }

    /*@Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles[position];
    }*/
}
